home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr07 / oleo130s.zip / OLEO130S.TAR / oleo-1.3 / configure.in < prev    next >
Text File  |  1993-03-16  |  1KB  |  56 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. dnl
  3. AC_INIT(io-term.c)
  4. AC_SUBST(LIBS)
  5.  
  6. dnl Checks for programs:
  7. AC_PROG_CC
  8. AC_PROG_CPP
  9. AC_PROG_YACC
  10. AC_PROG_INSTALL
  11.  
  12. dnl Checks for UNIX variants that set `DEFS':
  13. AC_ISC_POSIX
  14.  
  15. dnl Checks for header files:
  16. AC_STDC_HEADERS
  17. AC_UNISTD_H
  18. AC_DIR_HEADER
  19. AC_HAVE_HEADERS(sys/time.h string.h memory.h sys/select.h)
  20. dnl X11 may need some extra libraries on SVR4
  21. test -f /lib/libsocket.a -o -f /lib/libsocket.so && LIBS="$LIBS -lsocket"
  22. test -f /lib/libnsl.a -o -f /lib/libnsl.so && LIBS="$LIBS -lnsl"
  23. AC_HEADER_CHECK(X11/X.h, AC_DEFINE(HAVE_X11_X_H); LIBS="$LIBS -lX11")
  24.  
  25. dnl checks for functions
  26. AC_RETSIGTYPE
  27. AC_ALLOCA
  28. AC_REPLACE_FUNCS(random)
  29.  
  30. dnl Replace vfprintf and vsprintf.
  31. dnl If either needs to be replaced, replace _doprnt.
  32. need_doprnt=
  33. AC_COMPILE_CHECK([vfprintf], , [vfprintf();], ,
  34. [LIBOBJS="$LIBOBJS vfprintf.o"; need_doprnt=1])
  35. AC_COMPILE_CHECK([vsprintf], , [vsprintf();], ,
  36. [LIBOBJS="$LIBOBJS vsprintf.o"; need_doprnt=1])
  37. if test $need_doprnt; then
  38.   AC_REPLACE_FUNCS(_doprnt)
  39. fi
  40.  
  41. AC_HAVE_LIBRARY(termcap, \
  42.         LIBS="$LIBS -lcurses -ltermcap", \
  43.         AC_HAVE_LIBRARY(termlib, \
  44.                 LIBS="$LIBS -lcurses -ltermlib", \
  45.                 LIBS="$LIBS -lcurses"))
  46.  
  47. LIBS_save="$LIBS"
  48. LIBS="$LIBS -lm"
  49. compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  50. AC_HAVE_FUNCS(rint rename \
  51.           getcap stricmp strincmp cbreak \
  52.           strdup strstr)
  53. LIBS="$LIBS_save"
  54.  
  55. AC_OUTPUT(Makefile)
  56.